package com.ruoyi.project.system.create.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.create.mapper.LiveCreateMapper;
import com.ruoyi.project.system.create.domain.LiveCreate;
import com.ruoyi.project.system.create.service.ILiveCreateService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 直播列表Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-25
 */
@Service
public class LiveCreateServiceImpl implements ILiveCreateService 
{
    @Autowired
    private LiveCreateMapper liveCreateMapper;

    /**
     * 查询直播列表
     * 
     * @param roomId 直播列表主键
     * @return 直播列表
     */
    @Override
    public LiveCreate selectLiveCreateByRoomId(Long roomId)
    {
        return liveCreateMapper.selectLiveCreateByRoomId(roomId);
    }

    /**
     * 查询直播列表列表
     * 
     * @param liveCreate 直播列表
     * @return 直播列表
     */
    @Override
    public List<LiveCreate> selectLiveCreateList(LiveCreate liveCreate)
    {
        return liveCreateMapper.selectLiveCreateList(liveCreate);
    }

    /**
     * 新增直播列表
     * 
     * @param liveCreate 直播列表
     * @return 结果
     */
    @Override
    public int insertLiveCreate(LiveCreate liveCreate)
    {
        return liveCreateMapper.insertLiveCreate(liveCreate);
    }

    /**
     * 修改直播列表
     * 
     * @param liveCreate 直播列表
     * @return 结果
     */
    @Override
    public int updateLiveCreate(LiveCreate liveCreate)
    {
        return liveCreateMapper.updateLiveCreate(liveCreate);
    }

    /**
     * 批量删除直播列表
     * 
     * @param roomIds 需要删除的直播列表主键
     * @return 结果
     */
    @Override
    public int deleteLiveCreateByRoomIds(String roomIds)
    {
        return liveCreateMapper.deleteLiveCreateByRoomIds(Convert.toStrArray(roomIds));
    }

    /**
     * 删除直播列表信息
     * 
     * @param roomId 直播列表主键
     * @return 结果
     */
    @Override
    public int deleteLiveCreateByRoomId(Long roomId)
    {
        return liveCreateMapper.deleteLiveCreateByRoomId(roomId);
    }
}
